import { status } from '@/plugins/mate.js'
export const formConfig = [
    {
        name: 'name',
        type: 'input',
        placeholder: '名称',
    },
    {
        name: 'topic',
        type: 'input',
        placeholder: 'mqtt主题',
    },
    {
        name: 'maker',
        type: 'input',
        placeholder: '创建者',
    },
]

export const config = [
    {
        name: 'name',
        type: 'input',
        label: '名称',
        placeholder: '请输入名称',
        required: true,
    },
    {
        name: 'topic',
        type: 'input',
        label: 'mqtt主题',
        placeholder: '请输入mqtt主题',
        required: true,
    },
    {
        name: 'models',
        type: 'select_id',
        label: '模型组',
        placeholder: '请选择模型组',
        options: [],
        required: true,
    },
    {
        name: 'maker',
        type: 'input',
        label: '创建人',
        placeholder: '请输入创建人',
        required: true,
    },

    // {
    //     name: 'filepath',
    //     type: 'file',
    //     label: '附件',
    //     action: '/api/report/upload',
    //     accept: '.txt',
    //     // required: true,
    // },
]

export const column = [
    // {
    //     name: 'selection',
    // },
    {
        label: '名称',
        name: 'name',
    },
    {
        label: 'topic主题',
        name: 'topic',
    },
    {
        label: '创建人',
        name: 'maker',
    },
    {
        label: '模型组',
        name: 'model_name',
    },
    {
        title: '操作',
        name: 'action',
        width: '220',
        buttons: [
            {
                text: '处理',
                click: (val) => {},
            },
            {
                text: '编辑',
                click: (val) => {},
            },
            {
                text: '删除',
                click: (val) => {},
            },
        ],
    },
]
export const tableMenu = [
    {
        type: 'primary',
        text: '发送',
        icon: 'el-icon-bottom',
        click: null,
    },
    {
        type: 'info',
        text: '重启mqtt',
        icon: 'el-icon-refresh-right',
        click: null,
    },
]
export const column_1 = [
    {
        label: '测试结果',
        name: 'pred_value',
    },
    {
        label: '测试名称',
        name: 'name',
    },
    {
        label: '模型版本',
        name: 'model_map',
    },
    {
        label: '模型组',
        name: 'model_name',
    },
    {
        label: '模型代码',
        name: 'modelcode',
    },

    {
        label: '时间',
        name: 'create_time',
    },
    {
        label: '文件名',
        name: 'fileName',
    },
    // {
    //     label: '告警等级',
    //     width: '120',
    //     name: 'warn_level',
    //     format: (val) => warn_level.dirc[val],
    //     color: (val) => warn_level.color[val],
    // },
    {
        title: '操作',
        name: 'action',
        width: '260',
        buttons: [],
    },
]
export const dialog = {
    labelWidth: '80px',
    config: [],
    form: {},
    title: '',
}
// 二级页面筛选配置
export const formConfig1 = [
    {
        name: 'start_time',
        type: 'date',
        label: '起始时间',
        placeholder: '请输入起始时间',
        required: true,
    },
    {
        name: 'end_time',
        type: 'date',
        label: '截止时间',
        placeholder: '请输入截止时间',
        required: true,
    },
    {
        name: 'modelcode',
        type: 'input',
        label: '模型代码',
        placeholder: '请输入模型代码',
        required: true,
    },
    {
        name: 'model_map',
        type: 'input',
        label: '模型版本',
        placeholder: '请输入模型版本',
        required: true,
    },
]
